# coding: utf-8
from . import db, BaseModel


class Rotationpic(db.Model):
    __tablename__ = 'rotationpic'

    auto_id = db.Column(db.BigInteger, primary_key=True, info='自增id')
    rotation_id = db.Column(db.BigInteger, nullable=False, info='轮换图编号')
    rotationpic_name = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), info='轮换图名字')
    rotationpic_url = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, info='轮换图URL')
    destination_url = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), info='跳转链接')
    is_delete = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='逻辑删除')
    create_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='创建时间')
    update_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue(), info='更新时间')
